# This file is part of Laivsys. See doc/README_FOR_APP for license.
# $Id$

class ApplicationFormController < ApplicationController
  layout 'admin' # TODO: Obviously not correct


  def index
    list
    render :action => 'list'
  end

  def list
  end

  def create
    @application_form = ApplicationForm.new(params[:application_form])
    @application_form.user = current_user
    @application_form.status = ApplicationForm::STATUS_PENDING
    if request.post? and @application_form.save
      flash[:notice] = "Application to laiv is saved"
      redirect_to :action => :index
    end
  end

  def show
    @application_form = ApplicationForm.find(params[:id])
  end

  def update
  end

  def delete
  end
end
